Finding asterisk.h when building asterisk-addons

chris (2005-03-24 16:19:35)
5332 views
1 replies
More of a note to myself, really, but.. the asterisk-addons source distribution comes with a makefile which forgets to include the asterisk header files.. a simple 'make' errors with the following:
root@nikita:/usr/src/asterisk-addons-1.0.4# make cc -fPIC -I../asterisk -D_GNU_SOURCE  -I/usr/include/mysql     -c -o cdr_addon_mysql.o cdr_addon_mysql.c
cdr_addon_mysql.c:24:22: asterisk.h: No such file or directory
make: *** [cdr_addon_mysql.o] Error 1

this is easily fixed by adding the following line to the asterisk-addons Makefile:
CFLAGS+=$(shell if [ -d /usr/src/asterisk-1.0.5 ]; then echo "-I/usr/src/asterisk-1.0.5"; fi)

Note, you will have to change the path to point to your asterisk source directory. Once that's done, just run 'make' again, and 'make install' and everything will be just fine

christo
comment
shah
2009-08-14 04:11:59

It worked for me

Christo, this worked for me.

Saved me a lot of time.

Cheers!
reply iconedit reply